package com.sxbbc.common.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sxbbc.common.basics.utils.statics.StaticUtils;
import com.sxbbc.common.core.entity.jz.WMenus;
import com.sxbbc.common.core.mapper.jz.WMenusMapper;
import com.sxbbc.common.core.service.IWMenusService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 仓库菜单表 服务实现类
 * </p>
 *
 * @author leehao
 * @since 2019-07-01
 */
@Service
public class WMenusServiceImpl extends ServiceImpl<WMenusMapper, WMenus> implements IWMenusService {

    @Override
    public List<WMenus> queryMenuList(List<Integer> list) {
        QueryWrapper<WMenus> wrapper = new QueryWrapper<>();
        wrapper.in("id",list);
        wrapper.eq("status", StaticUtils.STATUS_YES);
        wrapper.orderByAsc("sort");
        return super.list(wrapper);
    }
}
